package com.zeta.eduservice.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zeta.eduservice.entity.question.EduPublishhomework;
import com.zeta.eduservice.entity.vo.PublishQuery;

/**
 * <p>
 * 发布作业 Mapper 接口
 * </p>
 *
 * @author zeta
 * @since 2020-11-10
 */
public interface EduPublishhomeworkMapper extends BaseMapper<EduPublishhomework> {
	@Select("select a.id ,d.name teacherId,a.name,a.intro,a.use_count,a.status,a.gmt_create,a.gmt_start,a.gmt_finish from (select * from edu_class_and_publichomework where class_id=#{classid}) c join edu_publishhomework a on a.id=c.publishomework_id join  edu_teacher d on a.teacher_id=d.id")
		List<EduPublishhomework> getByClassId(Page<EduPublishhomework> pageParam,@Param("classid") String classid);
}
